import HomeView from '@/views/HomeView.vue'
import AboutView from '@/views/AboutView.vue'
import UserLoginPage from '@/views/user/UserLoginPage.vue'
import UserRegisterPage from '@/views/user/UserRegisterPage.vue'
import UserManagePage from '@/views/admin/UserManagePage.vue'

export const routes=[
  {
    path: '/',
    name: '主页',
    component: HomeView,
  },
  {
    path: '/about',
    name: '关于',
    // which is lazy-loaded(懒加载方式) when the route is visited.
    // component: () => import('../views/AboutView.vue'),
    // 或者使用 import 按需懒加载组件，按需加载是一种优化首次打开站点性能的方式。
    component: AboutView,
  },
  {
    path: '/user/login',
    name: '用户登录',
    component: UserLoginPage,
    isMenuOpen: false,
    meta: {
      showHidden:true
    }
  },
  {
    path: '/user/register',
    name: '用户注册',
    component: UserRegisterPage,
    meta: {
      showHidden:true
    }
  },
  {
    path: '/admin/userManage',
    name: '用户管理',
    component: UserManagePage,
  },
]
